﻿@model ALTP.Models.RegisterModel
<script>
    $(function () {
        $("form.ajaxRegister").submit(function () {
            $.post($(this).attr("action"), $(this).serialize(), function (data) {
                $("#msgRegister").html(data.Message);
                if (data.IsOk == true) {
                    sansang();
                    return true;
                }
            });
            return false;
        });
    });
</script>


<div class="page ">
    <div class="innerPage">
        <div class="box0">
            <a href="javascript:void(0)">
                <img src="/Content/Imgs/icon_logo_in_app.png" />
            </a>
        </div>
        <div class="box1 formdkdn">
            @using (Html.BeginForm("Register", "Account", FormMethod.Post, new { @class = "ajaxRegister" }))
            {
                @Html.AntiForgeryToken()
                @Html.ValidationSummary()
                <table>
                    <tr>
                        <td>Tài khoản</td>
                        <td>
                            <input type="text" name="UserName" size="20" id="UserName" placeholder="Tài khoản" />
                        </td>
                    </tr>
                    <tr>
                        <td>Mật khẩu</td>
                        <td>
                            <input type="password" name="Password" id="Password" placeholder="Mật khẩu" />
                        </td>

                    </tr>
                    <tr>
                        <td>Nhập lại MK</td>
                        <td>
                            <input type="password" name="ConfirmPassword" id="ConfirmPassword" placeholder="Nhập lại mật khẩu" />
                        </td> 
                    </tr>
                    <tr>
                        <td></td>
                        <td><div style="text-align:center;color:red; font-weight:bold;" id="msgRegister"></div></td>
                    </tr>
                    <tr>
                        <td></td>
                        <td><input type="submit" class="login_submit" value="Đăng ký" />
                            <a href="javascript:void(0)" title="Đăng ký" class="dangky" onclick="mySwiper.swipeTo(1)">Đăng nhập</a>
                        </td>
                    </tr>
                </table>
            }
        </div>
    </div>
</div>
 
@*@using (Html.BeginForm()) {
    @Html.AntiForgeryToken()
    @Html.ValidationSummary()
     
        <ol>
            <li>
                @Html.LabelFor(m => m.UserName)
                @Html.TextBoxFor(m => m.UserName)
            </li>
            <li>
                @Html.LabelFor(m => m.Password)
                @Html.PasswordFor(m => m.Password)
            </li>
            <li>
                @Html.LabelFor(m => m.ConfirmPassword)
                @Html.PasswordFor(m => m.ConfirmPassword)
            </li>
        </ol>
        <input type="submit" value="Register" /> 
}*@
 
